import request from '@/utils/request'

export default {
  branchList(query) {
    return request({
      url: '/system/party/jglist',
      method: 'get',
      params: query
    })
  },
  // 党支部详情
  branchDetail(id) {
    return request({
      url: `/system/party/${id}`,
      method: 'get'
    })
  },
  // 上级党支部下拉列表
  partyList() {
    return request({
      url: '/system/party/list',
      method: 'get'
    })
  },

  // 新增党支部
  addParty(data) {
    return request({
      url: "/system/party",
      method: "post",
      data: data,
    });
  },

// 修改党支部
  updateParty(data) {
    return request({
      url: "/system/party/edit",
      method: "post",
      data: data,
    });
  },

  // 删除党支部
  delParty(id) {
    return request({
      url: "/system/party/remove/" + id,
      method: "get",
    });
  }
}
